﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <meta name="HandheldFriendly" content="true" />
    <title>两学一做</title>
    <link rel="stylesheet" href="https://dj.ischooldays.com/idealDJP/static/wxcore/learndo/css/style.css" />
    <script type="text/javascript" src="https://dj.ischooldays.com/idealDJP/static/wxcore/learndo/js/jquery.min.js"></script>
    <script type="text/javascript" src="https://dj.ischooldays.com/idealDJP/static/layer/layer.js"></script>
    <style type="text/css">
        .layui-layer-loading {
            text-align: center;
            width: 100%;
        }

        .layui-layer-content {
            margin: 0 auto;
        }
    </style>
</head>
<body id="list1">
    <header class="listhd"><a href="https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo.action" class="goback"><img src="https://dj.ischooldays.com/idealDJP/static/wxcore/learndo/images/goback.png" alt=""></a></header>
    <section class="listbox">
        <div class="tabt cl">
            <a href="https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo!xjdx.action?catalogid=8a847c355d7d60f2015d7d66cccb0005&tagId=8a847c615d7da7a4015d7dae59340002" class="on">党员</a>
            <a href="https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo!xjdx.action?catalogid=8a847c355d7d60f2015d7d66cccb0005&tagId=8a847c615d7da7a4015d7daed0b10003">党务工作者</a>
            <a href="https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo!xjdx.action?catalogid=8a847c355d7d60f2015d7d66cccb0005&tagId=8a847c615d7da7a4015d7daf0a6c0004">党组织</a>
        </div>
        <div class="tabcon">
            <ul class="list">

                <!--<a href="#">
                    <li class="cl">
                        <div class="info">
                            <div class="infocon">
                            </div>
                        </div>
                    </li>
                </a>-->

                <a href="https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo!xjdxInfo.action?id=8aaec1925dd1eb6d015ddec03dc905ae&catalogid=8a847c355d7d60f2015d7d66cccb0005&tagId=8a847c615d7da7a4015d7dae59340002">
                    <li class="cl">
                        <div class="pic">
                            <img flag src="http://180.153.158.96:8080/ftpfiles//images/2017/10/16/1508156478607.JPG"  alt=""></div>
						    <div class="info"><h5>锐意进取 追求教育强国梦</h5>
							<div class="infocon"><p>卢起升同志现任上海市第八中学校长，是一名信念坚定、知行合一的优秀共产党员，也是一名...</p></div>
							</div></li></a>

            </ul>
        </div>
    </section>
</body>
<script>
	//数据是否在加载
	var loading = false;
	//滑轮的运动状态 up 、 down
	var srollDirection = "";
	//滑轮上一次所在的位置
	var scrollTop = 0;
	$(window).scroll(function() {
	   scrollLoad();
	   initSrollDirection();
	});


	function initSrollDirection(){
		srollDirection =  scrollTop - $(window).scrollTop() == 0 ?  "" : scrollTop - $(window).scrollTop() > 0 ? "up" :"down";
	   	scrollTop =  $(window).scrollTop();
	}

	function scrollLoad() {
		if(loading || srollDirection != "down") return;
		var viewHeight = $(window).scrollTop() + $(window).height();
		var documentHeight = $(document).height();
		if (documentHeight - viewHeight <= 10 && hasNextPage == true) {
			loaddate();
		}
	}
$(window).ready(function() {
	    loaddate();
	});
//是否有下一页
var hasNextPage = true;
//当前页
var pageIndex=0;
var catalogid = '8a847c355d7d60f2015d7d66cccb0005';
var tagId = '8a847c615d7da7a4015d7dae59340002';
function loaddate(){
		loading = true;
		layer.load(3, {shade: 'background-color: rgba(0,0,0,.3)',shadeClose:true});
		$.ajax({
            //url: 'https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo!load.action',
            url: 'dj_list_data.txt',
		type : 'get',
		data : {'pageIndex':pageIndex+1,'catalogid':catalogid,'tagId':tagId},
		success : function(data) {
					if(data.state == "ok"){
						pageIndex = data.pageIndex;
						hasNextPage = data.pageCount > data.pageIndex;
						var list = data.rows;
						var html="";
						var summary = "";
						for(var i=0; i<list.length; i++){
							if(list[i].summary.length>40){
								summary = list[i].summary.substr(0, 40)+"...";
							}else{
								summary = list[i].summary;
							}
                            html += '<a href="https://dj.ischooldays.com/idealDJP/wxcore/web/learndo/learndo!xjdxInfo.action?id='+list[i].id+'&catalogid=8a847c355d7d60f2015d7d66cccb0005&tagId=8a847c615d7da7a4015d7dae59340002"><li class="cl">'+
                                '<div class="pic"><img flag src="http://180.153.158.96:8080/ftpfiles' + list[i].logo + '"  onerror="this.src=\'' +'https://dj.ischooldays.com/idealDJP/static/wxcore/learndo/images/xjdx.jpg'+'\';"  alt=""></div>'+
									'<div class="info">'+
										'<h5>'+list[i].title+'</h5>'+
										'<div class="infocon"><p>'+summary+'</p></div>'+
									'</div></li></a>';
						}
						$('.list').append(html);
						initImgHeight();
					}else{
						layer.msg('加载失败！');
					}
					layer.closeAll("loading");
					loading = false;
				},
			error:function(){
				layer.closeAll("loading");
				layer.msg('加载失败！');
				loading = false;
			},

		});
}
function initImgHeight(){
	var allimg = $('.list').find("img[flag]");
	allimg.each(function(){
		$(this).css("max-height",$(this).width()*1.25);
		$(this).css("min-height",$(this).width()*0.5);
		//$(this).height($(this).width()*0.9);
		$(this).removeAttr("flag");
	});
}
</script>
</html>
